<template>
	<view>
		<view v-for="(item,index) in res" :key="index" style="padding: 0 20upx;background-color: #FFFFFF;border-radius: 20upx;margin-top: 5upx;border-bottom: 2upx solid #eeeeee;position: relative;box-shadow: 2upx 2upx 10upx #CCCCCC;" >
			<view style="padding: 0 20upx;">
				<view style="height: 80upx;line-height: 80upx;font-size: 32upx;display: flex;">
					<view style="text-align: left;flex: 1;height: 80upx;line-height: 80upx;color: #ccc;">均价</view>
					<view style="text-align: right;flex: 1;height: 80upx;line-height: 80upx;">{{item.balance}}</view>
				</view>
				<view style="height: 80upx;line-height: 80upx;font-size: 32upx;display: flex;">
					<view style="text-align: left;flex: 1;height: 80upx;line-height: 80upx;color: #ccc;">返利金额</view>
					<view style="text-align: right;flex: 1;height: 80upx;line-height: 80upx;">{{item.price}}</view>
				</view>
				<view style="height: 80upx;line-height: 80upx;font-size: 32upx;display: flex;">
					<view style="text-align: left;flex: 1;height: 80upx;line-height: 80upx;color: #ccc;">返利类型</view>
					<view style="text-align: right;flex: 1;height: 80upx;line-height: 80upx;" v-if="item.type == 1" >团队奖</view>
					<view style="text-align: right;flex: 1;height: 80upx;line-height: 80upx;" v-if="item.type == 2" >提现</view>
					<view style="text-align: right;flex: 1;height: 80upx;line-height: 80upx;" v-if="item.type == 3" >区域奖</view>
					<view style="text-align: right;flex: 1;height: 80upx;line-height: 80upx;" v-if="item.type == 4" >撤销</view>
					<view style="text-align: right;flex: 1;height: 80upx;line-height: 80upx;" v-if="item.type == 5" >消费</view>
				</view>
				<!-- <view style="min-height: 80upx;line-height: 80upx;color: #ff5500;" v-if="item.remark != ''">
					<text style="color: #ccc;">驳回理由</text>
					<text style="padding-left: 40upx;">{{item.remark}}</text>
				</view> -->
			</view>
			
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				user_id:'',
				res: [],
				imagess:[],
				imgurl:'',
			};
		},
		onLoad:function(){
			uni.showLoading()
			uni.getStorage({
				key: 'user_id',
				success: (res) => {
					this.user_id = res.data
					this.setAjax()
				},
				fail: () => {
					uni.navigateTo({
						url: '../../index/index'
					});
				}
			});
		},
		methods:{
			setAjax(){
				uni.request({
					url: 'https://cx.mingmeijt.com/Api/CommisionLog/index?p=5',
					method: 'POST',
					header:{'Content-Type':'application/x-www-form-urlencoded'},
					data:{
						user_id: this.user_id,
					},
					success: res => {
					this.res = res.data.data.data.list
					console.log(this.res)
					},
					fail: () => {},
					complete: () => {}
				});
				uni.hideLoading()
			},
			jump(e){
				uni.navigateTo({
					url: e.currentTarget.dataset.src
				});
			},
		}
	}
</script>

<style>
</style>

